package com.huilian.iotbox.data.enums;

import lombok.Getter;

/**
 * @author: lizhiquan
 * @Date 2020/4/15 11:08
 */
@Getter
public enum PayCompanyEnum {

    MYBANK("mybank", "网商", false),
    VBILL("vbill", "随行付", false),
    STARPOS("starpos", "新大陆", false),
    HUIFU("huifu", "汇付天下", false),
    HELIPAY("helipay", "合利宝", true),
    HELIPAY_02("helipay_02", "合利宝2(自营)", true),
    HELIPAY_03("helipay_03", "合利宝3(银瑞)", true),
    YEEPAY("yeepay", "易宝", false),
    YEAHKA("yeahka", "乐刷", false),
    MYBANK_CLOUD("mybank_cloud", "网商云资金（汇联云）", false),

    STATUS_ONE("1","关闭",false),
    STATUS_ZERO("0","开启",false),
    ;
    private String code;
    private String desc;
    // 节假日手续费，合利宝在 节假日+周末 收取万2手续费（不包含在支付手续费内）
    private Boolean holidayServiceFee;

    PayCompanyEnum(String code, String desc, Boolean holidayServiceFee) {
        this.code = code;
        this.desc = desc;
        this.holidayServiceFee = holidayServiceFee;
    }

    public static boolean getIsHeLiPay(String code) {

        if (
            PayCompanyEnum.HELIPAY.code.equalsIgnoreCase(code)
            || PayCompanyEnum.HELIPAY_02.code.equalsIgnoreCase(code)
            || PayCompanyEnum.HELIPAY_03.code.equalsIgnoreCase(code)
        ){
            return true;
        }
        return false;
    }

}
